﻿<?php session_start(); ?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<title>Redirecting...</title>

<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<link rel=stylesheet href="../css-layouts/themes/defaulttheme.css" type="text/css">

</head>

<?php

 /*
  * This is the final logout function wherein the cookies
  * stored in the user's computer are deleted (the login
  * information and session handles).
  */
 setcookie("parentinformerurcshs", "", time() - 3600, "/");
 setcookie("parentinformerprcshs", "", time() - 3600, "/");
 $_SESSION = array();
 session_destroy();
?>

<body>

<div class="bgredir redirout">

<p class="textwrapredir">

You have successfully logged out from Parent Informer!
<br><br>
You will be redirected to the Login Lobby in <span id="timectr">5</span> second<span id="spluralize">s</span>.
<br><br>
<img src="../img/themes/default/loader.gif" alt="Circle Loader">
<br><br>
<em><a href="../">Skip</a> to Login Lobby.</em>

</p>
</div>

<script type="text/javascript">
<!--

var redirecturl = "../";
var timedelay = 5;

// CODE! :D

function redirme() {
 if (timetoredir) {
  clearInterval(timetoredir);
 }
 window.location = redirecturl;
}

function changetime() {
 ctrin = document.getElementById("timectr").innerHTML;
 ctrin--;
 timedelay--;
 document.getElementById("timectr").innerHTML = ctrin;
 
 if(timedelay < 2) {
  document.getElementById("spluralize").innerHTML = "";
 }

 if(timedelay == 0) {
  redirme();
 }

}

var timetoredir = setInterval("changetime()", 1000);

//-->
</script>

</body>
</html>